export default (callback: Function, doms: Document[]) => {
    document.addEventListener('click', (e) => {
        let isAway = true
        doms.map((el: Document) => {
            // @ts-ignore
            //只要有任意一个被点击，就不算clickAway
            if (el.contains(e.target)) {
                isAway = false
                return
            }
        })
        if (isAway) {
            callback()
        }
    })
}